Italian update from Pietro Modi
[adiumx.git] / Plugins / Video Chat Interface / AIVideoChatWindowController.m
blob2c8cb12f65594fa1cc116668166bf4220a7cf474
1 //
2 //  AIVideoChatWindowController.m
3 //  Adium
4 //
5 //  Created by Adam Iser on 12/4/04.
6 //  Copyright 2004 __MyCompanyName__. All rights reserved.
7 //
9 #import "AIVideoChatWindowController.h"
11 #define VIDEO_CHAT_NIB  @"VideoChat"
13 @implementation AIVideoChatWindowController
15 + (id)windowForVideoChat:(AIVideoChat *)inVideoChat
17         return [[[self alloc] initWithWindowNibName:VIDEO_CHAT_NIB videoChat:inVideoChat] autorelease];
20 - (id)initWithWindowNibName:(NSString *)windowNibName videoChat:(AIVideoChat *)inVideoChat
22         [super initWithWindowNibName:windowNibName];
24         videoChat = [inVideoChat retain];
25         
26         //Observe frames for this video chat
27         [[adium videoChatController] registerVideoChatObserver:self];
28         
29         return self;
32 //Setup the window before it is displayed
33 - (void)windowDidLoad
35         NSWindow        *window = [self window];
36         NSRect          frame = [window frame];
37         
38         [window setAspectRatio:NSMakeSize(frame.size.width, frame.size.height)];
41 - (BOOL)windowShouldClose:(id)sender
43         [[adium videoChatController] unregisterVideoChatObserver:self];
44         [videoChat release];
45         
49 //Frames
50 - (void)videoChatFrameChanged:(AIVideoChat *)inVideoChat
52         [videoImageView setImage:[videoChat remoteFrame]];
55 @end